# align all pdbs in a directory to a reference pdb
pdb_dir="/home/tanyang/data/colabfold/Ago_sequences/pdb_only"
out_dir="/home/tanyang/data/colabfold/Ago_sequences/tm_score"
for file in "$pdb_dir"/*.pdb; 
do
    filename=$(basename "$file" .pdb)
    if [ -f "$out_dir/$filename.csv" ]; then
        echo "$out_dir/$filename.csv" exists
        continue
    fi
    echo "submit $filename"
    qsub -v reference_pdb="$pdb_dir/$filename.pdb",predicted_pdb_dir=$pdb_dir,out_file="$out_dir/$filename.csv" -N tm"_"$filename example/metric/align.pbs
done